<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="bottle" prefix="b"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>角色管理</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" type="text/css" href="../lib/easyui/themes/metro/easyui.css"/>
  <link rel="stylesheet" type="text/css" href="../lib/easyui/themes/icon.css"/>
  <style type="text/css">
	.base-form table{border-collapse:collapse;table-layout:fixed;width:100%;}
	.base-form table td{padding:0;}
	.base-form .label{padding-right:5px;height:25px;text-align:right;}
	.base-form .label.top{vertical-align:top;padding-top:5px;}
	.base-form .text,.base-form textarea{font-size:12px;border:1px solid #B5B4B8;width:85%;height:20px;padding:0 5px;}
	.base-form textarea{resize:none;height:50px;}
	.base-form .red{color:red;}
	.base-form .tip{color:#999;padding:2px 0 3px;}
	/*筛选条件toolbar*/
	.condition{padding-bottom:5px;display:none;}
	.condition .title{font-size:14px;font-weight:bold;padding:0 5px 5px;border-bottom:1px dotted #CCC;}
	.condition .item{border-radius:3px;white-space:nowrap;margin:5px 10px 0 0;height:20px;line-height:20px;float:left;padding:0 22px 0 3px;position:relative;border:1px #AAA solid;}
	.condition a:link,.condition a:visited{position:absolute;top:2px;right:2px;text-decoration:none;width:16px;height:16px;background:url('../lib/easyui/themes/icons/cross.png');display:block;overflow:hidden;}
	.condition a:hover,.condition a:active{background:url('../lib/easyui/themes/icons/cross.png') #DDD;}
	
	.list-bt{width:16px;height:16px;border:0;cursor:pointer;}
	/*权限*/
	.explain h3{font-size:14px;margin:0;padding:0;}
	.explain p{text-indent:24px;margin:10px 0 5px 0;color:#50B3F6;;}
	.explain ul{margin:0;padding:0;list-style:none;}
	.explain li{word-wrap:break-word;padding-left:20px;line-height:22px;margin:3px 0;background:url('../images/list-icon.gif') no-repeat 5px 6px;}
  </style>
 </head>
 <body class="easyui-layout">
 	<div data-options="region:'center',title:'查询内容'">
	   <table id="list" class="easyui-datagrid" data-options="
               url:'search.jx',
		        fit:true,
		        singleSelect:true,
		        rownumbers:true,
		        pagination:true,
		        toolbar:'#toolbar',
                loadFilter:function(obj){
                	$.successParser(obj);
                    if(obj.success){
                        return obj;
                    }
                    return {'total':0,'rows':[]};
                },
                onLoadError:$.errorParser
           ">
           <thead>
                <tr>
                    <th data-options="field:'name',width:150,sortable:true">角色名</th>
                    <th data-options="field:'desct',width:300">描述</th>
                    <b:buttons actions="ROLE_UPDATE" var="item">
	                    <th data-options="field:'${item.id}',align:'center',width:60,formatter:function(value,row,index){
	                       return '<input type=\'button\' class=\'list-bt ${item.iconCls}\' onclick=\'${item.action}('+row.id+')\'/>';
	                    }">修改</th>
                    </b:buttons>
                    <b:buttons actions="ROLE_DELETE" var="item">
	                    <th data-options="field:'${item.id}',align:'center',width:60,formatter:function(value,row,index){
	                       return '<input type=\'button\' class=\'list-bt ${item.iconCls}\' onclick=\'${item.action}('+row.id+')\'/>';
	                    }">删除</th>
                    </b:buttons>
                    <b:buttons actions="ROLE_PERM" var="item">
	                    <th data-options="field:'${item.id}',align:'center',width:60,formatter:function(value,row,index){
	                       return '<input type=\'button\' class=\'list-bt ${item.iconCls}\' onclick=\'${item.action}('+row.id+')\'/>';
	                    }">权限管理</th>
                    </b:buttons>
                </tr>
            </thead>
       </table>
	   <div id="toolbar">
          <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" plain="true" id="search">查询</a>
          <b:buttons actions="ROLE_ADD" var="item">
	          <a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="ROLE_ADD();">增加</a>
          </b:buttons>
	   	  <div id="condition" class="condition">
				<div class="title">当前查询条件</div>
				<div id="items">
                    <div class="item"><b>关键字搜索</b><a href="javascript:void(0);" title="删除该条件"></a></div>
                    <div style="clear:both;"></div>
				</div>
		   </div>
	   </div>
	</div>
	<div id="condWin" title="查询" style="display:none;padding:10px;"></div>
	<div id="addWin" title="新增" style="display:none;padding:10px;"></div>
	<div id="updateWin" title="修改" style="display:none;padding:10px;"></div>
	<div id="permissionWin" title="权限管理" style="display:none;padding:10px;"></div>
	<script type="text/javascript" src="../lib/jquery.min.js"></script>
	<script type="text/javascript" src="../lib/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../lib/easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../js/common.js"></script>
	<script type="text/javascript" src="../js/basemg.js"></script>
	<script type="text/javascript" src="../js/role.js"></script>
 </body>
</html>
